package com.guashu.springbootdistributedid.web;


import com.github.yitter.idgen.YitIdHelper;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {

    @GetMapping("/getID")
    public String export() {
        // 初始化后，在任何需要生成ID的地方，调用以下方法：
        long newId = YitIdHelper.nextId();
        String s = "序列号："+newId;
        return  s;
    }

}
